home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / Recent1 / AmIRCFinger.lha / finger.amirx < prev   
Text File  |  1997-03-18  |  3KB  |  74 lines

  1. /* Finger script for use with AmIRC 1.x */ Version='1.05' /*
  2. // Written by Deryk Robosson 11.3.96
  3. //
  4. // newlook@ameritech.net newlook on #amiga IRC (EfNet & IRCnet)
  5. //
  6. // 01.03.97 (1.01) - Now deletes tempfile
  7. //                   Supports showing a user the output - Suggested by SimD
  8. // 01.07.97 (1.02) - Supports passing user nick for input - Suggested by SimD
  9. // 03.03.97 (1.03) - Changed all ' to ' for AmIRC commands per the docs.
  10. // 04.03.97 (1.04) - Prettied up the display of information
  11. //                   Corrected command parsing error.
  12. //                   Script wasn't deleting the temp file. Corrected.
  13. // 18.03.97 (1.05) - cleaned up the code
  14. */
  15. bold = d2c(2)
  16. underline = '1F'x
  17.  
  18. tempfile = 't:finger.temp'
  19.  
  20. options results
  21. parse arg param
  22.  
  23. if param = ''|upper(param)='VER' then signal version
  24. if upper(param) = 'HELP' then signal help
  25.  
  26. parse var param who' 'command' 'user
  27. command = upper(command)
  28.  
  29. 'USERHOST 'who
  30. if result ~= 'RESULT' then who = result
  31.  
  32. ADDRESS COMMAND 'amitcp:bin/finger' who' >T:finger.temp'
  33.  
  34. if open(file, tempfile,'R') then do
  35.     do until eof(file)
  36.         line = ReadLn(file)
  37.         if line ~= '' then do
  38.             select
  39.                 when command = 'SAY' then 'SAY' line
  40.                 when command = 'SHOW' then 'RAW NOTICE' user ':'line
  41.                 otherwise
  42.                     if command = '' then 'echo P='ESC||BOLD'«Finger» 'line
  43.             end
  44.     end
  45. end
  46. close(file)
  47. address command 'delete' tempfile 'quiet force'
  48. exit
  49.  
  50. version:    /* show the user version information */
  51.     call echo(bold'Finger.AMIRX'bold' Version 'bold||version)
  52.     call echo('Read the top of Finger.AMIRX script for history.')
  53.     call echo(bold'©1996,1997'bold' Deryk Robosson 'bold'(newlook)'bold' - [newlook@newlook@ameritech.net]')
  54.     call echo(bold'Type /<alias> help for command information')
  55. exit
  56.  
  57. help:   /* show the user help examples */
  58.     call echo(bold'Finger.AMIRC'bold' Help')
  59.     call echo(bold'SAY  - 'bold'ECHOs output to window')
  60.     call echo(bold'VER  - 'bold'displays script version')
  61.     call echo(bold'SHOW - 'bold'displays outout to user')
  62.     call echo(bold'HELP - 'bold'displays this file')
  63.     call echo(bold||underline'EXAMPLES:'bold||underline)
  64.     call echo(bold'/Finger usernick 'bold' to see output yourself')
  65.     call echo(bold'/Finger user@site 'bold' to see output yourself')
  66.     call echo(bold'/Finger usernick SAY 'bold' to show output to channel')
  67.     call echo(bold'/Finger user@site SHOW usernick 'bold' to show output to a user')
  68. exit
  69.  
  70. echo: procedure
  71.     parse arg a
  72.     'echo P='d2c(27)'b«Finger» 'a
  73. return 1
  74.